<template>
  <div>
    <formTitle title="基本信息" />
    <VForm
      ref="vformComponents"
      :form="formData.form"
      :options="formData.options"
      :rules="formData.rules"
      :labelWidth="formData.labelWidth"
      :rowspan="rowspan"
      @toLoadMethods="toLoadMethods"
    ></VForm>
    <formTitle title="处置信息" />
    <el-collapse v-model="recordHandleList_activeNames">
      <el-collapse-item v-for="(item,index) in recordHandleList" :key="item.id" :title="`${getDictLabel(disposeStatusOptions,item.unitHandled)} - ${item.unitHandledTime||''}`" :name="index">
        <el-card class="box-card">
          <VForm
            :disabled="true"
            :form="item"
            :options="formData2.options"
            :rules="formData2.rules"
            :labelWidth="formData2.labelWidth"
            :rowspan="rowspan"
            @toLoadMethods="toLoadMethods"
          ></VForm>
        </el-card>
      </el-collapse-item>
    </el-collapse>

    <template v-if="openType != 'detailAll'">
      <formTitle title="新增处置" />
      <VForm
        ref="vformComponents2"
        :form="formData2.form"
        :options="formData2.options"
        :rules="formData2.rules"
        :labelWidth="formData2.labelWidth"
        :rowspan="rowspan"
        @toLoadMethods="toLoadMethods"
      ></VForm>
    </template>

    <div  class="e-dialog-footer">
        <span slot="footer" class="dialog-footer">
      <el-button @click="cancel">取 消</el-button>
      <el-button v-if="openType != 'detailAll'" type="primary" @click="sure">确 定</el-button>
    </span>
    </div>
  </div>
</template>

<script>
  import {
    alarmRecordDetail,
    alarmRecordUpdate,
    alarmRecordAdd,
    alarmRecordHandleDetail,
    alarmRecordHandleAdd,
    alarmRecordHandleList,
  } from "@/api/alarm/record";
  import VForm from "@/components/VForm";
  import { alarmFacilityList } from "@/api/alarm/facility";
  import { alarmMonitorPointList } from "@/api/alarm/point";
  import { alarmDeviceList } from "@/api/alarm/device";
  import formTitle from "@/components/FormTitle/formTitle.vue";
    export default {
      components: {
        VForm,
        formTitle,
      },
      props: {
        width: {
          type: String,
          default: "70%",
        },
        title: {
          type: String,
          default: "详情",
        },
        id: {},
        openType: {
          type: String,
          default: "add",
        },
        dialogVisible: {
          type: Boolean,
          default: false,
        },
      },
      watch: {
        width: {
          handler(newVal, oldVal) {
            console.log("newVal===", newVal, oldVal);
            let w = this.width.split("%")[0];
            if (w >= 60) {
              this.rowspan = 2;
            } else {
              this.rowspan = 1;
            }
          },
          deep: true,
          immediate: true,
        },
        modeType: {
          handler(newVal, oldVal) {
            this.formData.form.modeType = newVal;
          },
          deep: true,
          immediate: true,
        },
        alarmTypeOptions: {
          handler(newVal, oldVal) {
            this.formData.options.forEach((t) => {
              if (t.key == "alarmType") {
                t.option.data = newVal;
              }
            });
          },
          deep: true,
          immediate: true,
        },
        facilityIdOptions: {
          handler(newVal, oldVal) {
            this.formData.options.forEach((t) => {
              if (t.key == "facilityId") {
                t.option.data = newVal;
              }
            });
          },
          deep: true,
          immediate: true,
        },
        monitorObjectIdOptions: {
          handler(newVal, oldVal) {
            this.formData.options.forEach((t) => {
              if (t.key == "pointId") {
                t.option.data = newVal;
              }
            });
          },
          deep: true,
          immediate: true,
        },
        deviceIdOptions: {
          handler(newVal, oldVal) {
            this.formData.options.forEach((t) => {
              if (t.key == "deviceId") {
                t.option.data = newVal;
              }
            });
          },
          deep: true,
          immediate: true,
        },
        alarmLevelOptions: {
          handler(newVal, oldVal) {
            this.formData.options.forEach((t) => {
              if (t.key == "maxAlarmLevel" || t.key == "nowAlarmLevel") {
                t.option.data = newVal;
              }
            });
          },
          deep: true,
          immediate: true,
        },
        alarmSourceOptions: {
          handler(newVal, oldVal) {
            this.formData.options.forEach((t) => {
              if (t.key == "alarmSource") {
                t.option.data = newVal;
              }
            });
          },
          deep: true,
          immediate: true,
        },
        notifyStatusOptions: {
          handler(newVal, oldVal) {
            this.formData.options.forEach((t) => {
              if (t.key == "notifyStatus") {
                t.option.data = newVal;
              }
            });
          },
          deep: true,
          immediate: true,
        },
        disposeStatusOptions: {
          handler(newVal, oldVal) {
            this.formData2.options.forEach((t) => {
              if (t.key == "unitHandled") {
                t.option.data = newVal;
              }
            });
          },
          deep: true,
          immediate: true,
        },
        alarmDisposeTypeOptions: {
          handler(newVal, oldVal) {
            this.formData2.options.forEach((t) => {
              if (t.key == "type") {
                t.option.data = newVal;
              }
            });
          },
          deep: true,
          immediate: true,
        },
        dialogVisible:{
          handler(newVal, oldVal) {
            if(newVal){
              console.log("监测指===",newVal)
              this.getData()
            }
          },
          deep: true,
          immediate: true
        }
      },
      computed: {
        isVisible: {
          get() {
            return this.dialogVisible;
          },
          set() {
            this.close();
          },
        },
      },
      data() {
        return {
          modeType: "",

          rowspan: 1,
          dict: {},
          formData: {
            form: {
              modeType: this.modeType,
              identificationCode: "",
              facilityId: "",
              facilityName: "",
              pointId: "",
              pointName: "",
              deviceId: "",
              equipmentName: "",
              alarmCode: "",
              alarmName: "",
              alarmPosition: "",
              monitorItem: "",
              firstAlarmNum: "",
              nowAlarmNum: "",
              firstAlarmTime: "",
              nowAlarmTime: "",
              nowAlarmLevel: "",
              maxAlarmNum: "",
              maxAlarmTime: "",
              maxAlarmLevel: "",
              alarmEndTime: "",
              alarmSource: "",
              alarmType: "",
              alarmAddress: "",
              lon: "",
              lat: "",
              provinceCode: "",
              cityCode: "",
              countyCode: "",
              areaCode: "",
              recovered: "",
              recoverAt: "",
              handled: "",
              handleResult: "",
              handleBy: "",
              handleAt: "",
              notifyStatus: "",
              notifyAt: "",
              createUser: "",
              updateTime: "",
              updateUser: "",
              mapData:null
            },
            options: [
              {
                title: "标识码",
                key: "identificationCode",
                type: "text",
                disabled: true,
              },
              {
                title: "设施名称",
                key: "facilityId",
                type: "select",
                event: "changePonit",
                multiple: false,
                disabled: false,
                option: {
                  data: this.facilityIdOptions,
                  props: {
                    key: "id", // 指定key对应data的字段
                    label: "name", // 指定label对应data的字段
                    value: "id", // 指定value对应data的字段
                  },
                },
              },
              {
                title: "点位名称",
                key: "pointId",
                type: "select",
                event: "changeDevice",
                multiple: false,
                disabled: false,
                option: {
                  data: this.monitorObjectIdOptions,
                  props: {
                    key: "id", // 指定key对应data的字段
                    label: "pointName", // 指定label对应data的字段
                    value: "id", // 指定value对应data的字段
                  },
                },
              },
              {
                title: "设备名称",
                key: "deviceId",
                type: "select",
                event: "changeItem",
                multiple: false,
                disabled: false,
                option: {
                  data: this.deviceIdOptions,
                  props: {
                    key: "id", // 指定key对应data的字段
                    label: "name", // 指定label对应data的字段
                    value: "id", // 指定value对应data的字段
                  },
                },
              },
              {
                title: "报警代码",
                key: "alarmCode",
                type: "text",
                disabled: true,
              },
              {
                title: "报警名称",
                key: "alarmName",
                type: "text",
                disabled: true,
              },
              {
                title: "报警地址",
                type:'mapPosition',
                key:'mapData',
                disabled: true
              },
              {
                title: "报警部位",
                key: "alarmPosition",
                type: "text",
                disabled: true,
              },
              {
                title: "监测项",
                key: "monitorItem",
                type: "text",
                disabled: true,
              },
              {
                title: "监测项代码",
                key: "monitorItemCode",
                type: "text",
                disabled: true,
              },
              {
                title: "初次报警值",
                key: "firstAlarmNum",
                type: "text",
                disabled: true,
              },
              {
                title: "初次报警时间",
                key: "firstAlarmTime",
                type: "datetime",
                disabled: true,
              },
              {
                title: "当前报警值",
                key: "nowAlarmNum",
                type: "text",
                disabled: true,
              },
              {
                title: "当前报警时间",
                key: "nowAlarmTime",
                type: "datetime",
                disabled: true,
              },
              {
                title: "当前报警级别",
                key: "nowAlarmLevel",
                type: "select",
                multiple: false,
                disabled: true,
                option: {
                  data: this.alarmLevelOptions,
                  props: {
                    key: "id", // 指定key对应data的字段
                    label: "label", // 指定label对应data的字段
                    value: "value", // 指定value对应data的字段
                  },
                },
              },
              {
                title: "最高报警值",
                key: "maxAlarmNum",
                type: "text",
                disabled: true,
              },
              {
                title: "最高报警时间",
                key: "maxAlarmTime",
                type: "datetime",
                disabled: true,
              },
              {
                title: "最高报警级别",
                key: "maxAlarmLevel",
                type: "select",
                multiple: false,
                disabled: true,
                option: {
                  data: this.alarmLevelOptions,
                  props: {
                    key: "id", // 指定key对应data的字段
                    label: "label", // 指定label对应data的字段
                    value: "value", // 指定value对应data的字段
                  },
                },
              },
              {
                title: "报警结束时间",
                key: "alarmEndTime",
                type: "datetime",
                disabled: true,
              },
              {
                title: "报警来源",
                key: "alarmSource",
                type: "select",
                multiple: false,
                disabled: true,
                option: {
                  data: this.alarmSourceOptions,
                  props: {
                    key: "id", // 指定key对应data的字段
                    label: "label", // 指定label对应data的字段
                    value: "value", // 指定value对应data的字段
                  },
                },
              },
              {
                title: "报警类型",
                key: "alarmType",
                type: "select",
                multiple: false,
                disabled: true,
                option: {
                  data: this.alarmTypeOptions,
                  props: {
                    key: "id", // 指定key对应data的字段
                    label: "label", // 指定label对应data的字段
                    value: "value", // 指定value对应data的字段
                  },
                },
              },
              // {
              //   title: "报警地址",
              //   key: "alarmAddress",
              //   type: "text",
              //   disabled: true,
              // },
            ],
            labelWidth: "140px",
          },
          formData2: {
            form: {
              recordId: "",
              type: "",
              handledUnit: "",
              handledUnitId: "",
              handledName: "",
              handledNameId: "",
              handledPhone: "",
              handledStage: "",
              mointorName: "",
              mointorNameId: "",
              handled: "",
              unitHandled: "",
              unitHandledTime: "",
              handleResult: "",
              analyseFile: [],
              picFile: [],
              videoFile: [],
              remark: "",
              sceneDescx: "",
              reasonDescx: "",
              handleDescx: "",
            },
            options: [
              // {
              //   title: "报警记录id",
              //   key: "recordId",
              //   type: "text",
              // },
              {
                title: "处置类型",
                key: "type",
                type: "radio",
                multiple: false,
                option: {
                  data: this.alarmDisposeTypeOptions,
                  props: {
                    key: "id", // 指定key对应data的字段
                    label: "label", // 指定label对应data的字段
                    value: "value", // 指定value对应data的字段
                  },
                },
                columnWidth: "w100",
              },
              {
                title: "处置单位",
                key: "handledUnit",
                type: "text",
              },
              // {
              //   title: "处置单位id",
              //   key: "handledUnitId",
              //   type: "text",
              // },
              {
                title: "处置负责人",
                key: "handledName",
                type: "text",
              },
              // {
              //   title: "处置负责人id",
              //   key: "handledNameId",
              //   type: "text",
              // },
              {
                title: "处置负责人手机",
                key: "handledPhone",
                type: "text",
              },
              {
                title: "处置阶段",
                key: "handledStage",
                type: "text",
              },
              {
                title: "监测职守人",
                key: "mointorName",
                type: "text",
              },
              // {
              //   title: "监测职守人id",
              //   key: "mointorNameId",
              //   type: "text",
              // },
              // {
              //   title: "当前处理标记(1.处置中 2.处置完成)",
              //   key: "handled",
              //   type: "text",
              // },
              {
                title: "单位处理状态",
                key: "unitHandled",
                type: "select",
                multiple: false,
                option: {
                  data: this.disposeStatusOptions,
                  props: {
                    key: "id", // 指定key对应data的字段
                    label: "label", // 指定label对应data的字段
                    value: "value", // 指定value对应data的字段
                  },
                },
              },
              {
                title: "处置记录时间",
                key: "unitHandledTime",
                type: "datetime",
              },
              {
                title: "分析报告",
                key: "analyseFile",
                type: "file",
                fileType: "file",
                listType: "text",
                uploadTextTip: "",
              },
              {
                title: "处置情况",
                key: "handleResult",
                type: "textarea",
                columnWidth: "w100max",
              },
              {
                title: "图片",
                key: "picFile",
                type: "file",
                fileType: "file",
                listType: "text",
                uploadTextTip: "",
                columnWidth: "w100",
              },
              {
                title: "视频",
                key: "videoFile",
                type: "file",
                fileType: "file",
                listType: "text",
                uploadTextTip: "",
                columnWidth: "w100",
              },
              // {
              //   title: "备注",
              //   key: "remark",
              //   type: "text",
              // },
              // {
              //   title: "情况说明",
              //   key: "sceneDescx",
              //   type: "text",
              // },
              // {
              //   title: "原因说明",
              //   key: "reasonDescx",
              //   type: "text",
              // },
              // {
              //   title: "处理说明",
              //   key: "handleDescx",
              //   type: "text",
              // },
            ],
            rules: {
              type: [{ required: true, message: "请选择处置类型", trigger: "blur" }],
              handledUnit: [
                { required: true, message: "请输入处置单位", trigger: "blur" },
              ],
              handledName: [
                { required: true, message: "请输入处置负责人", trigger: "blur" },
              ],
              handledPhone: [
                { required: true, message: "请输入处置负责人手机", trigger: "blur" },
              ],
              handledStage: [
                { required: true, message: "请输入处置阶段", trigger: "blur" },
              ],
              mointorName: [
                { required: true, message: "请输入监测职守人", trigger: "blur" },
              ],
              unitHandled: [
                { required: true, message: "请选择单位处理状态", trigger: "change" },
              ],
              unitHandledTime: [
                { required: true, message: "请选择处置记录时间", trigger: "blur" },
              ],
              handleResult: [
                { required: true, message: "请输入处置情况", trigger: "blur" },
              ],
              analyseFile: [
                { required: true, message: "请输入", trigger: "blur" },
              ],
              // picFile: [{ required: true, message: "请上传图片", trigger: "blur" }],
              // videoFile: [
              //   { required: true, message: "请上传视频", trigger: "blur" },
              // ],
            },
            labelWidth: "240px",
          },
          recordHandleList: [],
          recordHandleList_activeNames: [],
          // 字典
          facilityIdOptions: [],
          monitorObjectIdOptions: [],
          deviceIdOptions: [],
          alarmTypeOptions: [],
          alarmSourceOptions: [],
          alarmLevelOptions: [],
          notifyStatusOptions: [],
          handleTypeOptions:[],
          alarmDisposeTypeOptions:[],
          disposeStatusOptions:[],
        };
      },
      methods: {
        toLoadMethods(methods) {
          this[methods]();
        },
        submitFormat(){
          this.formData2.form.analyseFile = JSON.stringify(this.formData2.form.analyseFile)
          this.formData2.form.picFile = JSON.stringify(this.formData2.form.picFile)
          this.formData2.form.videoFile = JSON.stringify(this.formData2.form.videoFile)
        },
        loadFormat(){
          let tempMapData = {}
          tempMapData.address = this.formData.form.alarmAddress
          tempMapData.gpsX = parseFloat(this.formData.form.lon)
          tempMapData.gpsY = parseFloat(this.formData.form.lat)
          tempMapData.towncode = this.formData.form.areaCode
          this.formData.form.mapData = tempMapData
          this.formData2.form.analyseFile  = this.formData2.form.analyseFile ? JSON.parse(this.formData2.form.analyseFile) : []
          this.formData2.form.picFile  = this.formData2.form.picFile ? JSON.parse(this.formData2.form.picFile) : []
          this.formData2.form.videoFile  = this.formData2.form.videoFile ? JSON.parse(this.formData2.form.videoFile) : []
        },
        changeItem() {
          const deviceId = this.formData.form.deviceId;
          const item = this.deviceIdOptions.find((t) => t.id == deviceId);
          if (item) {
            this.formData.form.equipmentName = item.name;
            this.formData.form.monitorItem = item.monitorTypeName;
            this.changeAddress(item);
          }
        },
        changeAddress(data) {
          console.log("changeAddress", data);
          this.formData.form.lon = data.lon;
          this.formData.form.lat = data.lat;
          this.formData.form.alarmAddress = data.installationAddress;

          this.formData.form.provinceCode = data.provinceCode;
          this.formData.form.cityCode = data.cityCode;
          this.formData.form.countyCode = data.countyCode;
          this.formData.form.areaCode = data.areaCode;
        },
        changeDevice() {
          this.deviceIdOptions = [];
          const pointId = this.formData.form.pointId;
          const item = this.monitorObjectIdOptions.find((t) => t.id == pointId);
          if (item) {
            this.formData.form.pointName = item.pointName;
          }

          this.getDeviceList(pointId);
        },
        getDeviceList(monitorObjectId) {
          alarmDeviceList({ monitorObjectId: monitorObjectId }).then((res) => {
            if (res.code == 200) {
              this.deviceIdOptions = res.data;
            } else {
              this.$message({
                message: this.$t("tips.systemException"),
                type: "error",
              });
            }
          });
        },
        changePonit() {
          this.monitorObjectIdOptions = [];
          const facilityId = this.formData.form.facilityId;
          const item = this.facilityIdOptions.find((t) => t.id == facilityId);
          if (item) {
            this.formData.form.facilityName = item.name;
          }
          console.log(facilityId);
          this.getMonitorObjectIdList(facilityId);
        },
        getMonitorObjectIdList(facilityId) {
          alarmMonitorPointList({ facilityId: facilityId }).then((res) => {
            if (res.code == 200) {
              this.monitorObjectIdOptions = res.data;
            } else {
              this.$message({
                message: this.$t("tips.systemException"),
                type: "error",
              });
            }
          });
        },
        getCheckBoxData(value, option, type) {
          if (type == "submit") {
            if (value.length == 0) {
              return null;
            }
            let temp = [];
            value.forEach((t) => {
              let item = option.find((x) => x.label == t);
              if (item != undefined) {
                temp.push(item.value);
              }
            });
            return temp.join(",");
          } else {
            if (!value) {
              return [];
            } else {
              let data = value.split(",");
              let temp = [];
              data.forEach((t) => {
                let item = option.find((x) => x.value == t);
                if (item != undefined) {
                  temp.push(item.label);
                }
              });
              return temp;
            }
          }
        },
        sure() {
          // this.formData.form.identificationCode="1"
          console.log("sure===", this.formData.form);
          this.$refs.vformComponents2.$refs.form.validate().then((res) => {
            this.submitFormat();
            if (this.openType == "add") {
              this.add();
            } else {
              this.update();
            }
          });
        },
        add() {
          this.formData.form.id = null;
          alarmRecordAdd(this.formData.form).then((res) => {
            if (res.code == 200) {
              this.$message({
                message: this.$t("tips.createSuccess"),
                type: "success",
              });
              this.closeSuccess();
            } else {
              this.$message({
                message: this.$t("tips.systemException"),
                type: "error",
              });
            }
          });
        },
        update() {
          // alarmRecordUpdate(this.formData.form).then((res) => {
          //   if (res.code == 200) {
          //     this.$message({
          //       message: this.$t("tips.updateSuccess"),
          //       type: "success",
          //     });
          //     this.closeSuccess();
          //   } else {
          //     this.$message({
          //       message: this.$t("tips.systemException"),
          //       type: "error",
          //     });
          //   }
          // });
          // console.log(this.formData2.form)
          alarmRecordHandleAdd(this.formData2.form).then((res) => {
            if (res.code == 200) {
              this.$message({
                message: this.$t("tips.updateSuccess"),
                type: "success",
              });
              this.closeSuccess();
            } else {
              this.$message({
                message: this.$t("tips.systemException"),
                type: "error",
              });
            }
          });
        },
        cancel() {
          this.close();
        },
        handleClose(done) {
          done();
          this.close();
        },
        closeSuccess() {
          this.$refs.vformComponents.$refs.form.resetFields();
          this.$emit("success");
        },
        close() {
          this.$refs.vformComponents.$refs.form.resetFields();
          this.$emit("close");
        },
        getData() {
          alarmRecordDetail(this.id).then((res) => {
            if (res.code == 200) {
              this.selectTypeInit(res);
              res.data.nowAlarmLevel = parseInt(res.data.nowAlarmLevel);
              res.data.alarmType = parseInt(res.data.alarmType);
              this.formData.form = res.data;
              this.formData2.form.recordId = res.data.id;
              this.changeDisabled(true);
              this.loadFormat();
            } else {
              this.$message({
                message: this.$t("tips.systemException"),
                type: "error",
              });
            }
          });
          // alarmRecordHandleDetail(this.id).then((res) => {
          //   if (res.code == 200) {
          //     this.formData2.form = res.data;
          //     this.formData2.form.type = parseInt(res.data.type);
          //     this.formData2.form.unitHandled = parseInt(res.data.unitHandled);
          //     this.formData2.form.unitHandledTime = res.data.unitHandledTime;
          //     this.loadFormat();
          //   } else {
          //     this.$message({
          //       message: this.$t("tips.systemException"),
          //       type: "error",
          //     });
          //   }
          // });
          alarmRecordHandleList({ recordId: this.id }).then((res) => {
            if (res.code == 200) {
              // this.handleTypeOptions = res.data
              res.data.forEach(t=>{
                t.analyseFile = JSON.parse(t.analyseFile)
                t.picFile = JSON.parse(t.picFile)
                t.videoFile = JSON.parse(t.videoFile)
              })
              this.recordHandleList = res.data
            } else {
              this.$message({
                message: this.$t("tips.systemException"),
                type: "error",
              });
            }
          });
          this.changeDisabled(false);
        },
        selectTypeInit(res) {
          //设施
          this.facilityIdOptions = [];
          this.getAlarmFacilityList();
          //点位
          this.monitorObjectIdOptions = [];
          this.getMonitorObjectIdList(res.data.facilityId);
          //设备
          this.deviceIdOptions = [];
          this.getDeviceList(res.data.pointId);
        },
        changeDisabled(value) {
          this.formData.options.find((t) => t.key == "facilityId").disabled = value;
          this.formData.options.find((t) => t.key == "pointId").disabled = value;
          this.formData.options.find((t) => t.key == "deviceId").disabled = value;
        },
        getAlarmFacilityList() {
          alarmFacilityList({ modeType: this.modeType }).then((res) => {
            if (res.code == 200) {
              this.facilityIdOptions = res.data;
            } else {
              this.$message({
                message: this.$t("tips.systemException"),
                type: "error",
              });
            }
          });
        },
        initAlarmConfig() {
          let type = this.$route.path;
          console.log("path:" + type);
          const config = this.$commonJs.getAlarmPathConfig(this.$route.path);
          this.modeType = config.modeType;
        },
        getDictLabel(dictArr, dictVal){
          let result = ""
          dictArr.forEach(t=>{
            if(t.value == dictVal){
              result = t.label
            }
          })
          return result
        },
      },
      created() {
        this.initAlarmConfig();
        this.alarmSourceOptions = [];
        this.$commonJs.filterDataDict("alarmSource", this.alarmSourceOptions);

        //报警类型
        let recordType = this.$commonJs.getAlarmPathConfig(this.$route.path).recordType;
        //alarmRecordType
        this.alarmTypeOptions = [];
        this.$commonJs.filterDataDict(recordType, this.alarmTypeOptions);

        this.alarmLevelOptions = [];
        this.$commonJs.filterDataDict("alarmLevel", this.alarmLevelOptions);

        this.disposeStatusOptions = []
        this.$commonJs.filterDataDict("disposeStatus", this.disposeStatusOptions)

        this.alarmDisposeTypeOptions = []
        this.$commonJs.filterDataDict("alarmDisposeType", this.alarmDisposeTypeOptions)

        //设施
        this.facilityIdOptions = [];
        this.getAlarmFacilityList();
      },
    };
</script>

<style lang="scss" scoped>
  ::v-deep .el-collapse-item__header{
    background-color: #F2F2F2;
    padding-left: 10px;
  }
  .e-dialog-footer{
    padding: 20rem 0 4rem 20rem;
    text-align: right;
    box-sizing: border-box;
  }
</style>

